package com.dzu.easy;

import java.util.Arrays;

/**
 * @author ZhaoDong
 * @date 2022/12/8 10:12
 * @description 492. 构造矩形
 */
public class Test492 {
    public static void main(String[] args) {
        System.out.println(Arrays.toString(constructRectangle(38)));

    }

    public static int[] constructRectangle(int area) {

        int sqrt = (int) Math.sqrt(area);
        while (area % sqrt != 0) {
            sqrt--;
        }
        return new int[]{area / sqrt, sqrt};

    }
}
